<div navbar ng-init="currentItem='service.named'"></div>
<div ng-show="Auth.processing||!loaded">
    <div loading></div>
</div>

<div id="main" ng-show="!Auth.processing&&loaded" style="display:none" ng-init="checkInstalled()">
    <div class="module-header">
        <h3>Named - DNS 域名解析服务器</h3>
    </div>

    <div srvinstall ng-init="name='named';pkg='bind';expected_repolist=['base'];"></div>

    <div class="tabbable" ng-show="installed">
        <ul class="nav nav-tabs">
            <li ng-class="'active' | iftrue:activeTabName=='base'"><a href="#base" ng-click="sec('base')" data-toggle="tab">基本信息</a></li>
            <li ng-class="'active' | iftrue:activeTabName=='settings'"><a href="#settings" ng-click="load_settings()" data-toggle="tab">基本设置</a></li>
            <li ng-class="'active' | iftrue:activeTabName=='ext'"><a href="#ext" ng-click="sec('ext')" data-toggle="tab">扩展</a></li>
            <li ng-class="'active' | iftrue:activeTabName=='configfile'"><a href="#configfile" ng-click="sec('configfile')" data-toggle="tab">配置文件</a></li>
            <li ng-class="'active' | iftrue:activeTabName=='logfile'"><a href="#logfile" ng-click="sec('logfile')" data-toggle="tab">日志</a></li>
            <li ng-class="'active' | iftrue:activeTabName=='update'"><a href="#update" ng-click="sec('update')" data-toggle="tab">升级</a></li>
            <li ng-class="'active' | iftrue:activeTabName=='uninstall'"><a href="#uninstall" ng-click="sec('uninstall')" data-toggle="tab">卸载</a></li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='base'" id="base">
                <div srvbase ng-init="name='named';pkg='bind';service='named';"></div>
            </div>
            <div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='settings'" id="settings">
                <table class="table table-condensed">
                    <thead>
                        <tr>
                            <th colspan="2">基本设置</th>
                        </tr>
                    </thead>
                    <tbody></tbody>
                </table>
                <button class="btn btn-primary" style="margin-left:10px" ng-click="savesettings()">保存设置</button>
            </div>
            <div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='ext'" id="ext">
                <div srvext ng-init="name='named';pkg='bind';"></div>
            </div>
            <div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='configfile'" id="configfile">
                <div srvfile ng-init="items=[
                {name: '主配置', path: '/etc/named.conf', isfile: true},
                {name: '解析配置', path: '/etc/resolv.conf', isfile: true},
                {name: 'hosts', path: '/etc/hosts', isfile: true},
                {name: '区域数据', path: '/var/named', isdir: true},
                {name: '区域配置', path:'/etc/named.rfc1912.zones', isfile: true}];"></div>
            </div>
            <div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='logfile'" id="logfile">
                <div srvlog ng-init="items=[{name:'日志文件', path:'/var/log/messages', isfile:true}];"></div>
            </div>
            <div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='update'" id="update">
                <div srvupdate ng-init="name='named';pkg='bind';"></div>
            </div>
            <div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='uninstall'" id="uninstall">
                <div srvuninstall ng-init="name='named';pkg='bind';"></div>
            </div>
        </div>
    </div>

</div>